<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			var reg=new RegExp("a");   
			var reg1=new RegExp("a","i");  //忽略大小写  //等价于var reg1=/a/i;
			console.log(typeof reg);  //它的类型是Object
			console.log(reg.test("Abcbc"));  //必须含有a才符合
			console.log(reg1.test("Abcbc"));
			reg2=/a|b/i;
			console.log(reg2.test("acd"));//true有a或者b就可以了  大小写野都系
			reg3=/[a-z]/i;  //只要含有a-z的大小写都可以  等价于reg3=/[A-z]/
			reg4=/a[bde]c/;  //检查是否含有abc/adc/aec
			reg5=/[^ab]/;  //没有a跟b就返回true
			reg6=/[0-9]/;//含任意数字就返回true
			console.log(reg5.test("a"));
		</script>
	</head>
	<body>
	</body>
</html>